﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using KPIS.GERP.GIMS.MODEL;
using KPIS.GERP.GIMS.DAL;
using KPIS.GERP.GIMS.DALFactory;
using KPIS.DBM;

namespace KPIS.GERP.GIMS.BLL
{
    public class BidderBLL
    {
        private static readonly BidderDAL dal = DataAccess.CreateBidder();

        public BidderBLL()
        {
        }

        public BidderInfo GetBidder(int BidderSeq)
        {
            return dal.GetBidder(BidderSeq);
        }

        public BidderInfo GetBidderContact(int bidder_seq)
        {
            return dal.GetBidderContact(bidder_seq);
        }

        public IList<BidderInfo> GetSeller(int PrSeq)
        {
            return dal.GetSeller(PrSeq);
        }

        public IList<BidderInfo> GetBidderFromBid(int BidSeq)
        {
            return dal.GetBidderFromBid(BidSeq);
        }

        public void Insert(BidderInfo infoBidder, IList<BidderQuotationInfo> infoListBidderQuotation, IList<DocumentInfo> infoListFile)
        {
            dal.Insert(infoBidder, infoListBidderQuotation, infoListFile);
        }

        public void InsertFromBid(BidderInfo info)
        {
            dal.InsertFromBid(info);
        }

        public void Update(BidderInfo infoBidder)
        {
            dal.Update(infoBidder);
        }

        public void DeleteFromDB(IList<BidderInfo> infoList)
        {
            dal.DeleteFromDB(infoList);
        }

        public IList<BidderInfo> GetSellerPurchaseOrder(string search_text)
        {
            return dal.GetSellerPurchaseOrder(search_text);
        }

        public void UpdateWinnerStatus(int bidder_seq, IDBManager dbManagerTran)
        {
            dal.UpdateWinnerStatus(bidder_seq, dbManagerTran);
        }
    }
}
